﻿@model CloudFranceTriple.WebRole.Models.ForumSearchCriteria

@{
    ViewBag.Title = CloudFranceTriple.WebRole.Properties.Resources.TopicListSearchTitle;
    Layout = "~/Views/Shared/_Layout.cshtml";
    Int32 counter = 0;
}
<div class="content-padding">
    <h1>@CloudFranceTriple.WebRole.Properties.Resources.TopicListSearchTitle</h1>
    <section>
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)

            <fieldset>
                <legend>ForumSearchCriteria</legend>

                <div class="editor-label">
                    @CloudFranceTriple.WebRole.Properties.Resources.SearchKeywords
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.Keywords)
                    @Html.ValidationMessageFor(model => model.Keywords)
                </div>

                <div class="editor-label">
                    @CloudFranceTriple.WebRole.Properties.Resources.SearchAuthors
                </div>
                <div class="editor-field">
                    <table>
                        <tr>
                            @foreach (String author in @Model.Authors)
                            {
                                <td>@Html.CheckBox("Authors[" + counter + "]", false, new { @value = author, @id = "Authors_" + counter++ + "_", @style = "float:left;padding:4px 0 0 4px;margin:0;" })
                                    <label for="author" style="float: left; font-size: small; padding: 0 0 6px 2px; margin: 0;">@author</label>
                                </td>

                                if (counter % 6 == 0)
                                {
                                    @Html.Raw("</tr><tr>")
                                }
                            }
                        </tr>
                    </table>
                </div>
                <div style="clear: both;"></div>

                <p>
                    <input type="submit" value="@CloudFranceTriple.WebRole.Properties.Resources.ButtonSearch" />
                </p>
            </fieldset>
        }
    </section>
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
